package com.dongdongshop.serviec.brand;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongdongshop.mapper.seller.TbTypeTemplateMapper;
import com.dongdongshop.pojo.seller.TbSpecificationOption;
import com.dongdongshop.pojo.seller.TbTypeTemplate;
import com.dongdongshop.service.TemplateService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component
@Service
public class TemplateServiceImpl implements TemplateService {
    @Resource
    private TbTypeTemplateMapper tbTypeTemplateMapper;



    @Override
    public List<TbTypeTemplate> findAll() {
        return tbTypeTemplateMapper.selectByExample(null);
    }

    @Override
    public int updateTemplate(TbTypeTemplate tbTypeTemplate) {
        return tbTypeTemplateMapper.updateByPrimaryKeySelective(tbTypeTemplate);
    }

    @Override
    public TbTypeTemplate updateById(Long id) {
        return tbTypeTemplateMapper.selectByPrimaryKey(id);
    }

    @Override
    public int addTemplate(TbTypeTemplate tbTypeTemplate) {
       return tbTypeTemplateMapper.addTemplate(tbTypeTemplate);
    }

    @Override
    public int deleteIds(Long[] ids) {
        return tbTypeTemplateMapper.deleteIds(ids);
    }

    @Override
    public List<TbTypeTemplate> listTemplate(String name) {
        return tbTypeTemplateMapper.listTemplate(name);
    }
}
